export default function ShowDate(date) {
  //   let date = new Date();

  let str = "";

  //   年
  let year = date.getFullYear();
  str += year;

  //   月
  str += "-";
  let month = date.getMonth() + 1;
  if (month < 10) {
    str += "0";
  }
  str += month;

  //   日
  str += "-";
  let day = date.getDate();
  if (day < 10) {
    str += "0";
  }
  str += day;

  //   时
  str += " ";
  let hour = date.getHours();
  if (hour < 10) {
    str += "0";
  }
  str += hour;

  //   分
  str += ":";
  let minute = date.getMinutes();
  if (minute < 10) {
    str += "0";
  }
  str += minute;

  return str;
}
